package com.yanqu.road.entity.activity.peakseacraft;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.utils.property.Property;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description 挑战数据
 */
@FieldTypeAnnotation(tableName = "t_c_activity_peak_seacraft_challenge")
public class PeakSeacraftCrossChallengeData extends DataObject {
    @FieldTypeAnnotation(desc = "活动id", select = true, update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "商会分组", select = true, update = true)
    private int unionGroup;
    @FieldTypeAnnotation(desc = "玩家id", update = true)
    private long userId;
    @FieldTypeAnnotation(desc = "当前挑战的联盟id")
    private String targetId = "";
    @FieldTypeAnnotation(desc = "本次挑战的类型 （0突袭攻 1进攻 ）")
    private int attackType;
    @FieldTypeAnnotation(desc = "当前出战的小队类型")
    private int teamType;
    @FieldTypeAnnotation(desc = "小队数据")
    private List<PeakSeacraftLockPatronsInfo> patronsInfoList = new ArrayList<>();
    @FieldTypeAnnotation(desc = "本次挑战连胜次数")
    private int winStreakNum;
    @FieldTypeAnnotation(desc = "领取到的连胜奖励档位")
    private int receiveWinStreakTimes;
    @FieldTypeAnnotation(desc = "已购买的buff道具id")
    private int buyBuffId;
    @FieldTypeAnnotation(desc = "已经攻打的船员集合")
    private List<Long> attackedList = new ArrayList<>();
    @FieldTypeAnnotation(desc = "已经随机出来的船员id")
    private Map<Long, PeakSeacraftTeamInfo> randomMap = new HashMap<>();
    @FieldTypeAnnotation(desc = "已买的buff加成值 百分比")
    private List<Integer> buffValueList = new ArrayList<>();
    @FieldTypeAnnotation(desc = "攻击时的对方联盟的耐久  (出战后锁定)")
    private long lockDurable;
    @FieldTypeAnnotation(desc = "本次挑战扣的耐久")
    private int deductDurable;
    @FieldTypeAnnotation(desc = "本次挑战总获得的积分")
    private int totalScore;
    @FieldTypeAnnotation(desc = "玩家商会与终点的距离 (进攻前的距离) 日志用 ")
    private long distance;
    @FieldTypeAnnotation(desc = "敌方商会与终点的距离 (进攻前的距离) 日志用 ")
    private long targetDistance;
    @FieldTypeAnnotation(desc = "累计击杀的门客数量  ")
    private int killPatronsNum;
    @FieldTypeAnnotation(desc = "当前攻打船只的排名 (挑战后锁定) ")
    private int targetUnionRank;
    @FieldTypeAnnotation(desc = "当前攻打船只的组内排名 (挑战后锁定) ")
    private int targetUnionGroupRank;
    @FieldTypeAnnotation(desc = "连胜获得的奖励")
    private Property winStreakReward = new Property();

    public PeakSeacraftCrossChallengeData() {
    }

    public PeakSeacraftCrossChallengeData(int activityId, int unionGroup, long userId) {
        this.activityId = activityId;
        this.unionGroup = unionGroup;
        this.userId = userId;
        setInsertOption();
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public String getTargetId() {
        return targetId;
    }

    public void setTargetId(String targetId) {
        if (targetId == null) {
            return;
        }
        if (this.targetId == null || !this.targetId.equals(targetId)) {
            this.targetId = targetId;
            setOp(DataStatus.Update);
        }
    }

    public int getAttackType() {
        return attackType;
    }

    public void setAttackType(int attackType) {
        if (this.attackType != attackType) {
            this.attackType = attackType;
            setOp(DataStatus.Update);
        }
    }

    public int getTeamType() {
        return teamType;
    }

    public void setTeamType(int teamType) {
        if (this.teamType != teamType) {
            this.teamType = teamType;
            setOp(DataStatus.Update);
        }
    }

    public List<PeakSeacraftLockPatronsInfo> getPatronsInfoList() {
        return patronsInfoList;
    }

    public void setPatronsInfoList(List<PeakSeacraftLockPatronsInfo> patronsInfoList) {
        if (null == patronsInfoList) {
            return;
        }
        if (this.patronsInfoList == null || !this.patronsInfoList.equals(patronsInfoList)) {
            this.patronsInfoList = patronsInfoList;
            setOp(DataStatus.Update);
        }
    }

    public int getWinStreakNum() {
        return winStreakNum;
    }

    public void setWinStreakNum(int winStreakNum) {
        if (this.winStreakNum != winStreakNum) {
            this.winStreakNum = winStreakNum;
            setOp(DataStatus.Update);
        }
    }

    public int getReceiveWinStreakTimes() {
        return receiveWinStreakTimes;
    }

    public void setReceiveWinStreakTimes(int receiveWinStreakTimes) {
        if (this.receiveWinStreakTimes != receiveWinStreakTimes) {
            this.receiveWinStreakTimes = receiveWinStreakTimes;
            setOp(DataStatus.Update);
        }
    }

    public int getBuyBuffId() {
        return buyBuffId;
    }

    public void setBuyBuffId(int buyBuffId) {
        if (this.buyBuffId != buyBuffId) {
            this.buyBuffId = buyBuffId;
            setOp(DataStatus.Update);
        }
    }

    public List<Long> getAttackedList() {
        return attackedList;
    }

    public void setAttackedList(List<Long> attackedList) {
        if (null == attackedList) {
            return;
        }
        if (this.attackedList == null || !this.attackedList.equals(attackedList)) {
            this.attackedList = attackedList;
            setOp(DataStatus.Update);
        }
    }

    public Map<Long, PeakSeacraftTeamInfo> getRandomMap() {
        return randomMap;
    }

    public void setRandomMap(Map<Long, PeakSeacraftTeamInfo> randomMap) {
        if (null == randomMap) {
            return;
        }
        if (this.randomMap == null || !this.randomMap.equals(randomMap)) {
            this.randomMap = randomMap;
            setOp(DataStatus.Update);
        }
    }

    public List<Integer> getBuffValueList() {
        return buffValueList;
    }

    public void setBuffValueList(List<Integer> buffValueList) {
        if (null == buffValueList) {
            return;
        }
        if (this.buffValueList == null || !this.buffValueList.equals(buffValueList)) {
            this.buffValueList = buffValueList;
            setOp(DataStatus.Update);
        }
    }

    public long getLockDurable() {
        return lockDurable;
    }

    public void setLockDurable(long lockDurable) {
        if (this.lockDurable != lockDurable) {
            this.lockDurable = lockDurable;
            setOp(DataStatus.Update);
        }
    }

    public int getDeductDurable() {
        return deductDurable;
    }

    public void setDeductDurable(int deductDurable) {
        if (this.deductDurable != deductDurable) {
            this.deductDurable = deductDurable;
            setOp(DataStatus.Update);
        }
    }

    public int getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(int totalScore) {
        if (this.totalScore != totalScore) {
            this.totalScore = totalScore;
            setOp(DataStatus.Update);
        }
    }

    public long getDistance() {
        return distance;
    }

    public void setDistance(long distance) {
        if (this.distance != distance) {
            this.distance = distance;
            setOp(DataStatus.Update);
        }
    }

    public long getTargetDistance() {
        return targetDistance;
    }

    public void setTargetDistance(long targetDistance) {
        if (this.targetDistance != targetDistance) {
            this.targetDistance = targetDistance;
            setOp(DataStatus.Update);
        }
    }

    public int getKillPatronsNum() {
        return killPatronsNum;
    }

    public void setKillPatronsNum(int killPatronsNum) {
        if (this.killPatronsNum != killPatronsNum) {
            this.killPatronsNum = killPatronsNum;
            setOp(DataStatus.Update);
        }
    }

    public int getTargetUnionRank() {
        return targetUnionRank;
    }

    public void setTargetUnionRank(int targetUnionRank) {
        if (this.targetUnionRank != targetUnionRank) {
            this.targetUnionRank = targetUnionRank;
            setOp(DataStatus.Update);
        }
    }

    public Property getWinStreakReward() {
        return winStreakReward;
    }

    public void setWinStreakReward(Property winStreakReward) {
        if (null == winStreakReward) {
            return;
        }
        if (this.winStreakReward == null || !this.winStreakReward.equals(winStreakReward)) {
            this.winStreakReward = winStreakReward;
            setOp(DataStatus.Update);
        }
    }

    public int getTargetUnionGroupRank() {
        return targetUnionGroupRank;
    }

    public void setTargetUnionGroupRank(int targetUnionGroupRank) {
        if (this.targetUnionGroupRank != targetUnionGroupRank) {
            this.targetUnionGroupRank = targetUnionGroupRank;
            setUpdateOption();
        }
    }

    public int getUnionGroup() {
        return unionGroup;
    }

    public void setUnionGroup(int unionGroup) {
        this.unionGroup = unionGroup;
    }
}
